<!DOCTYPE html>
<html lang="en" ng-app="wumodule">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/angular.min.js"></script>
    <style>
        .ng-cloak {
            display: none;
        }
    </style>
</head>
<body ng-cloak class="ng-cloak">
<div ng-controller="ctrl">
    {{ name }}

    <button ng-click="fun()">点击我看看</button>
    <p>
        <span>商品名称：{{goods.title}}</span><br>
        <span>商品价格:{{goods.price}}</span>
    </p>
</div>

<script>
    // 定义模块
    var m = angular.module('wumodule', []);
    // 定义控制器
    m.controller('ctrl', ['$scope', function (scope) {
        scope.name = "小明";
        scope.fun = function () {
            alert('fun');
        };
        scope.goods = {
            'title': 'apple mac',
            'price': 300
        };
    }]);
</script>
</body>
</html>